<!--#include file="./doctype.html"-->
<title><%=editTitle%>栏目-<%=siteTitle%>-后台管理</title>
</head><body>
<div class="wrap">
	<ol class="breadcrumb">
		<li><a href="<%=fileName%>?q=index">列表首页</a></li>
		<li class="active"><a href="javascript:;" class="reload"><%=editTitle%></a></li>
	</ol>
	<% if iid = 0 then %>
	<div class="alert alert-success">
		<span class="close" data-dismiss="alert">&times;</span>
		<strong>注意：</strong>栏目添加后所属大类就将不可改变！
	</div>
	<% end if%>
	<form method="post" action="<%=fileName%>?q=save" class="mb10" role="form">
		<input type="hidden" name="id" value="<%=iid%>">
		<div class="form-group fix">
			<input id="className" name="className" class="form-control inline w30" placeholder="栏目名称" value="<%=data(1)%>" />
			<label class="inline control-label" for="className">栏目名称</label>
		</div>
		<% if iid = 0 then %>
		<div class="form-group fix">
			<div class="inline w30 genre_id" data-name="genreID" data-id="<%=data(0)%>"></div>
			<label class="inline control-label" for="genreID">栏目所属大类</label>
		</div>
		<% end if%>
		<div class="form-group fix">
			<div class="inline w30 view_id" data-name="classViewID" data-id="<%=data(2)%>"></div>
			<label class="inline control-label" for="classViewID">栏目模板</label>
		</div>
		<div class="form-group fix">
			<div class="inline w30 view_id" data-name="contentViewID" data-id="<%=data(3)%>"></div>
			<label class="inline control-label" for="contentViewID">栏目下的内容页面模板</label>
		</div>
		<div class="form-group fix">
			<label class="btn btn-sm btn-default control-label">
                <input name="isStop" value="<%=data(4)%>" type="checkbox"
                <% if app.cj_bool(data(4)) then %>checked="checked"<% End if %>
                > 是否禁用？
            </label>
		</div>
		<div class="form-group fix text-center submit_box"></div>
	</form>
    <!--#include file="loadTime.html"-->
</div>
<script>
$(document).ready(function() {
	$('.view_id').getView();
	$('#className').checkEmpty();
	<% if iid = 0 then %>
	$('.genre_id').getKind({
	    url: './ajax.asp?q=getGenre',
	    type: 'select'
    });
	<% end if%>
$(this)
	.on('submit', 'form', function(){
		return $.submitForm('#className');
	});
});
</script>
</body>
</html>